home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Gold Collection / Software Vault - The Gold Collection (American Databankers) (1993).ISO / cdr11 / ddj9304.zip / OS2WPS.ZIP / UNINST.C < prev    next >
Text File  |  1992-10-22  |  865b  |  31 lines

  1. // uninstall.c -- uninstall program
  2. //
  3. //  compile and link with:  icc /Ss /Ti uninst.c
  4.  
  5. #define INCL_WINWORKPLACE
  6. #include <os2.h>
  7.  
  8. int main ( int argc, char *argv[] )
  9. {
  10.     HAB     hab;                    // anchor block
  11.     HOBJECT hobjFolder;             // folder object
  12.     HOBJECT hobjProg;               // program object
  13.     BOOL    fSuccess;               // return from API
  14.  
  15.   // create an anchor block so we can retrieve errors
  16.     hab = WinInitialize ( 0 );
  17.  
  18.   // unregister our object class for our data files
  19.     fSuccess = WinDeregisterObjectClass ( "WPSpread" );
  20.     if ( fSuccess == FALSE )
  21.     {
  22.         ULONG   ul;             // error code
  23.  
  24.         ul = WinGetLastError ( hab );
  25.         printf ("Unable to deregister class, error = %x\n",
  26.                 ERRORIDERROR ( ul ) );
  27.     }
  28.  
  29.     WinTerminate ( hab );
  30. }
  31.